package main

import (
	"CS_TWO/client"
	"fmt"
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mysql"
)

func main() {
	db, err := gorm.Open("mysql", "root:Fjm233233@@(localhost)/address_book?charset=utf8mb4&parseTime=True&loc=Local")
	if err != nil {
		fmt.Println("mysql链接错误", err.Error())
		return
	}

	ui := client.UI{}
	ui.Start(db)

	defer db.Close()
}
